package main

import "fmt"

type InputQuestion struct {
	Question string   `json:"question"`
	Option   []string `json:"option"`
	Answer   string   `json:"answer"`
	Analysis string   `json:"analysis"`
}

var score = map[string]int{"A": 1, "B": 2, "C": 4, "D": 8, "E": 16, "F": 32, "G": 64, "H": 128, "I": 256, "J": 512, "对": 1, "错": 0}

func CalculateScore(answer string) int {
	count := 0
	for _, item := range answer {
		fmt.Println(item)
		count += score[string(item)]
	}
	return count
}

//func main() {
//	fmt.Println(CalculateScore("A,C,D"))
//}
